/**
 * Project: topdt-jbpm
 * Copyright 2013  Top Digital Technology  Co. Ltd.
 * All right reserved.
 */
package com.topdt.jbpm.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 建立日期 : 2013-4-12 下午3:59:36<br>
 * 作者 : balance<br>
 * 模块 : <br>
 * 描述 : <br>
 * 修改历史: 序号 日期 修改人 修改原因 <br>
 * 1 <br>
 * 2 <br>
 */
@Entity
@Table(name = "wf_form")
public class Form extends JbpmModel {

	private static final long serialVersionUID = 6724704419106318680L;
	public static final String TempletStorageType_FILE = "file";
	public static final String TempletStorageType_BYTE = "byte";

	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Column(length = 32)
	private String formId;
	// 模板存储方式 file和byte
	private String templetStorageType;
	//如果templetStorageType是file,则该字段有值,存储的是文件路径
	private String templetPath;
	//如果templetStorageType是btye,则该字段有值,存储的是二进制数据
	@Lob
	private byte[] templetByte;// 二进制模板
    @Lob
	private byte[] templateViewByte;//表单预览的模板

    private String formName;//表单名称
	
    @Lob
    private byte[] mobileTemplateByte;//客户端表单模板
	
	public String getFormId() {
		return formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	public String getTempletStorageType() {
		return templetStorageType;
	}

	public void setTempletStorageType(String templetStorageType) {
		this.templetStorageType = templetStorageType;
	}

	public String getTempletPath() {
		return templetPath;
	}

	public void setTempletPath(String templetPath) {
		this.templetPath = templetPath;
	}

	public byte[] getTempletByte() {
		return templetByte;
	}

	public void setTempletByte(byte[] templetByte) {
		this.templetByte = templetByte;
	}

	public String getFormName() {
		return formName;
	}

	public void setFormName(String formName) {
		this.formName = formName;
	}

	public byte[] getTemplateViewByte() {
		return templateViewByte;
	}

	public void setTemplateViewByte(byte[] templateViewByte) {
		this.templateViewByte = templateViewByte;
	}

	public byte[] getMobileTemplateByte() {
		return mobileTemplateByte;
	}

	public void setMobileTemplateByte(byte[] mobileTemplateByte) {
		this.mobileTemplateByte = mobileTemplateByte;
	}

}
